package gtkwire.widget.cairo;

/**
* The pattern is a solid (uniform) color. It may be opaque or translucent, depending on the color used to initialize pattern.
*/
public class CairoSolidPattern extends CairoPattern
{
	private CairoColor c;

	public CairoSolidPattern( CairoColor color )
	{
		super();
		c = color;
		if( !c.hasAlpha() )
			p_create_pattern_rgb ( pattern_id, c.getRed(), c.getGreen(), c.getBlue() );
		else
			p_create_pattern_create_rgba( pattern_id, c.getRed(), c.getGreen(), c.getBlue(), c.getAlpha() );
	}

	/**
	* Returns the color of the pattern.
	*/ 
	public CairoColor get_rgba(){ return c; }

}//end class